<?php 
$this->headScript()
	->appendFile($this->baseUrl()."/js/jquery/development-bundle/ui/jquery.ui.core.js")
	->appendFile($this->baseUrl()."/js/jquery/development-bundle/ui/jquery.ui.widget.js")
	->appendFile($this->baseUrl()."/js/jquery/development-bundle/ui/jquery.ui.button.js")
	->appendFile($this->baseUrl()."/js/jquery/plugins/jwysiwyg/jquery.wysiwyg.js");

$this->headLink()->appendStylesheet($this->baseUrl(). '/js/jquery/development-bundle/themes/ui-lightness/jquery.ui.all.css');
$this->headLink()->appendStylesheet($this->baseUrl(). '/js/jquery/plugins/jwysiwyg/jquery.wysiwyg.css', "screen");

$addproduct=	false;
$addcategory=	false;
$parent=$this->CatParent;
$this->headTitle('Agregar categorías');


?>
<script type="text/javascript">
$(document).ready(function(){
	$( ".buttonyui" ).button();
  $('#categories_description').wysiwyg({
    controls: {
      strikeThrough : { visible : true },
      underline     : { visible : true },
      
      separator00 : { visible : true },
      
      justifyLeft   : { visible : true },
      justifyCenter : { visible : true },
      justifyRight  : { visible : true },
      justifyFull   : { visible : true },
      
      separator01 : { visible : true },
      
      indent  : { visible : true },
      outdent : { visible : true },
      
      separator02 : { visible : false },
      
      subscript   : { visible : false },
      superscript : { visible : false },
      
      separator03 : { visible : false },
      
      undo : { visible : false },
      redo : { visible : false },
      
      separator04 : { visible : false },
      
      insertOrderedList    : { visible : false },
      insertUnorderedList  : { visible : false },
      insertHorizontalRule : { visible : false },
      
      h4mozilla : { visible : true && $.browser.mozilla, className : 'h4', command : 'heading', arguments : ['h4'], tags : ['h4'], tooltip : "Header 4" },
      h5mozilla : { visible : true && $.browser.mozilla, className : 'h5', command : 'heading', arguments : ['h5'], tags : ['h5'], tooltip : "Header 5" },
      h6mozilla : { visible : true && $.browser.mozilla, className : 'h6', command : 'heading', arguments : ['h6'], tags : ['h6'], tooltip : "Header 6" },
      
      h4 : { visible : true && !( $.browser.mozilla ), className : 'h4', command : 'formatBlock', arguments : ['<H4>'], tags : ['h4'], tooltip : "Header 4" },
      h5 : { visible : true && !( $.browser.mozilla ), className : 'h5', command : 'formatBlock', arguments : ['<H5>'], tags : ['h5'], tooltip : "Header 5" },
      h6 : { visible : true && !( $.browser.mozilla ), className : 'h6', command : 'formatBlock', arguments : ['<H6>'], tags : ['h6'], tooltip : "Header 6" },
      
      separator07 : { visible : false },
      
      cut   : { visible : false },
      copy  : { visible : false },
      paste : { visible : false }
    }
  });
});
    </script>

<div class="section">
<div class="section_inner">
<p class="errorText">&nbsp;<?php echo $this->messageError; ?></p>
<div class="title_wrapper">
	<h2>Agregar categor&iacute;as y subcategor&iacute;as</h2>

</div>
<div class="section_content">

			<form action="<?php echo $this->escape($this->form->getAction()); ?>/catParent/<?php echo $parent;?>/"  method="<?php echo $this->escape($this->form->getMethod()); ?>" id="<?php echo $this->escape($this->form->getName()); ?>" name="<?php echo $this->escape($this->form->getName()); ?>"  enctype="<?php echo $this->escape($this->form->getEnctype()); ?>"  class="search_form general_form">
<!--[if !IE]>start fieldset<![endif]-->
								<fieldset>
									<!--[if !IE]>start forms<![endif]-->
									<div class="forms">			
			<input type="hidden" name="id" value="<?php echo (int) $this->CatInfo['Id']; ?>" />			
			  
			<!--[if !IE]>start row<![endif]-->
			<div class="row">
				<label>Nombre:</label>
				<div class="inputs">
					<span class="input_wrapper">
					<input class="text" type="text" name="categories_name" size = "33" maxlength = "32" value="<?php echo $this->CatInfo['Name'];?>" />
					
					</span>
					<span class="system positive"></span>
				</div>
			</div>
			<!--[if !IE]>end row<![endif]-->
			
			<!--[if !IE]>start row<![endif]-->
			<div class="row">
				<label>Descripción:</label>
					<span class="wrapper">
						<textarea  name="categories_description" id="categories_description" cols="103" rows="5"><?php echo $this->CatInfo['Description'];?></textarea>
					</span>
				</div>
			<!--[if !IE]>end row<![endif]-->
			
			<!--[if !IE]>start row<![endif]-->
		  	<div class="row">
				<label>Imagen:</label>
				<div class="inputs">
				<?php if(isset($this->CatInfo['Thumb']) && $this->CatInfo['Thumb'] != "") { ?>
						<div  style="display: block;">
                			<img src="<?php echo $this->baseUrl(); ?>/images/files/category/Thumb/<?php echo $this->CatInfo['Thumb'];?>" />
                		</div>
				<?php } ?>
					<span class="input_wrapper blank">
						<?php echo $this->form->category_image;?>
					</span>
				</div>
			</div>
			<!--[if !IE]>end row<![endif]-->	
			

				
						<input  class="buttonyui" name="submit" value="Agregar" type="submit" />
						<a class="buttonyui" href="<?php echo $this->baseUrl();?>/admin/categories/index/Id/<?php echo (isset($this->CatInfo['IdParent']) ? $this->CatInfo['IdParent'] : (isset($parent))? $parent : 0); ?>/">
							Cancelar
						</a>
			    	</div>
			    </fieldset>
			    
			    	
			</form>
</div>
</div>
</div>

